package org.liuyunfeng.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author: TanJingyu
 * @create: 2022-03-31 15:12
 **/
@RestController
@RequestMapping("/count")
public class CountController {
    private AtomicInteger count = new AtomicInteger();

    @GetMapping
    public int count() {
        return count.addAndGet(1);
    }
}

    